+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
+Tue Feb 20 12:16:12 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkiconfactory.c (gtk_icon_set_new_from_pixbuf): New
+ function to create an icon set from a pixbuf.
+
2001-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkcellrenderertext.[ch]:
return icon_set;
}
+/**
+ * gtk_icon_set_new_from_pixbuf:
+ * @pixbuf: a #GdkPixbuf
+ *
+ * Creates a new #GtkIconSet seeded with @pixbuf.
+ *
+ * Return value: a new #GtkIconSet
+ **/
+GtkIconSet *
+gtk_icon_set_new_from_pixbuf (GdkPixbuf *pixbuf)
+{
+ GtkIconSet *set;
+
+ GtkIconSource source = { NULL, NULL, 0, 0, NULL,
+ TRUE, TRUE, TRUE };
+
+ g_return_val_if_fail (pixbuf != NULL, NULL);
+
+ set = gtk_icon_set_new ();
+
+ source.pixbuf = pixbuf;
+
+ gtk_icon_set_add_source (set, &source);
+
+ return set;
+}
+
+
/**
* gtk_icon_set_ref:
* @icon_set: a #GtkIconSet
/* Icon sets */
GtkIconSet* gtk_icon_set_new (void);
+GtkIconSet* gtk_icon_set_new_from_pixbuf (GdkPixbuf *pixbuf);
GtkIconSet* gtk_icon_set_ref (GtkIconSet *icon_set);
void gtk_icon_set_unref (GtkIconSet *icon_set);
* pixbuf; you still need to unref it if you own references.
* #GtkImage will add its own reference rather than adopting yours.
*
+ * Note that this function just creates an #GtkImage from the pixbuf. The
+ * #GtkImage created will not react to state changes. Should you want that, you
+ * should use @gtk_image_new_from_icon_set.
+ *
* Return value: a new #GtkImage
**/
GtkWidget*